<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[itemids]" id="c-itemids-hidden" />

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Clinicname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-clinicname" data-rule="required" class="form-control" name="row[clinicname]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Itemids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="text-muted"><input type="checkbox" name="" id="expandall" /> <label for="expandall"><small>展开全部</small></label></span>
            <div id="treeview"></div>
            <div id="selected-items-info" class="mt-2"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Totalprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-totalprice" data-rule="required" class="form-control" step="0.01" name="row[totalprice]" type="number" value="0.00" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[date]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-time" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[time]" type="text" value="{:date('H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Firstname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-firstname" data-rule="required" class="form-control" name="row[firstname]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lastname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lastname" class="form-control" name="row[lastname]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email" data-rule="required" class="form-control" name="row[email]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" class="form-control" name="row[phone]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-address" class="form-control " rows="5" name="row[address]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Message')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-message" class="form-control " rows="5" name="row[message]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>

<script>
    var nodeData = JSON.parse('{:json_encode($itemTreeData)}');
    var selectedIds = [];
    var selectedCounts = {};
</script>
